package com.aspose.cells;

import java.util.ArrayList;

class zzi extends zyr {
   private zabk a;
   private zagu[] b;
   private int c;
   private zaar d;

   public zzi(int var1, zabk var2) {
      this.a = var2;
      this.c = var1;
   }

   public zzi(int var1, zabk var2, zagu[] var3) {
      this.a = var2;
      this.c = var1;
      this.b = var3;
   }

   private zzi() {
   }

   public zagu i() {
      zzi var1 = new zzi();
      var1.a = this.a;
      var1.c = this.c;
      if (this.b != null) {
         var1.b = new zagu[this.b.length];

         for(int var2 = 0; var2 < this.b.length; ++var2) {
            var1.b[var2] = this.b[var2].i();
         }
      }

      if (this.d != null) {
         var1.d = this.d.a();
      }

      return var1;
   }

   public void j() {
      if (this.d != null) {
         this.d.b();
      }

   }

   public void k() {
      this.d = null;
   }

   public zabk l() {
      return this.a;
   }

   public int b() {
      return 7;
   }

   public Object c() {
      return this.a;
   }

   public Object b(zaay var1) {
      return this.d(var1).b(var1);
   }

   public int d() {
      return this.c;
   }

   public int a(zaay var1) {
      return this.a.c().a();
   }

   public void e() {
      if (this.b != null) {
         if (this.a.b() == 1) {
            this.b[0].e();
            zagu var1 = this.b[1];
            if (var1 != null && var1.b() != 9) {
               var1.e();
            }

            if (this.b.length > 2) {
               var1 = this.b[2];
               if (var1 != null && var1.b() != 9) {
                  var1.e();
               }
            }
         } else {
            zagu[] var5 = this.b;
            int var2 = var5.length;

            for(int var3 = 0; var3 < var2; ++var3) {
               zagu var4 = var5[var3];
               var4.e();
            }
         }
      }

   }

   public boolean c(zaay var1) {
      zagv var2 = this.a.c();
      if (var2.a() == 96) {
         return true;
      } else {
         if (this.b != null) {
            for(int var3 = 0; var3 < this.b.length; ++var3) {
               if (var2.b(var3) == 64 && this.b[var3].c(var1)) {
                  return true;
               }
            }
         }

         return false;
      }
   }

   public int b(zaay var1, int var2) {
      int var3 = 0;
      switch(this.a.b()) {
      case 8:
      case 9:
         if (this.b == null) {
            return 1;
         }
         break;
      case 50:
      case 52:
      case 63:
      case 74:
      case 464:
         var3 = 1;
         break;
      case 125:
         if (this.b.length == 1) {
            return 1;
         }
      }

      zagv var4 = this.a.c();
      if (this.b != null) {
         for(int var5 = 0; var5 < this.b.length; ++var5) {
            var3 |= this.b[var5].b(var1, var2 == 96 ? var2 : var4.b(var5));
            if (var3 > 1) {
               return var3;
            }
         }
      }

      return var3;
   }

   public int b(zaay var1, boolean var2) {
      if (this.a.b() != 63 && this.a.b() != 464) {
         if (this.b == null) {
            return 0;
         } else {
            int var3 = 3;
            zagv var4 = this.a.c();

            for(int var6 = 0; var6 < this.b.length; ++var6) {
               int var5 = this.b[var6].b(var1, var4.b(var6) != 64);
               var3 &= var5;
               if (var3 == 0) {
                  return var3;
               }
            }

            if (var4.a() == 32 && !var2) {
               if (this.d != null && this.d.a != null) {
                  return var3 & this.d.a.b(var1, var2);
               } else {
                  return 0;
               }
            } else {
               return var3;
            }
         }
      } else {
         return 0;
      }
   }

   public boolean a(zaay var1, int var2, int var3, boolean var4) {
      if (this.b == null) {
         if (this.d != null) {
            this.d.a = null;
            this.d.b = null;
            this.d.c = null;
         }

         return true;
      } else {
         zagv var5 = this.a.c();
         boolean var6 = false;

         for(int var7 = 0; var7 < this.b.length; ++var7) {
            if (this.b[var7].a(var1, var2, var3, var5.b(var7) != 64)) {
               var6 = true;
            }
         }

         if (var6) {
            if (this.d != null) {
               this.d.a(var1, var2, var3, var4);
            }
         } else if (var5.a() == 32) {
            if (this.d != null && this.d.a != null) {
               var6 = this.d.a.a(var1, var2, var3, var4);
            } else if (!var4) {
               var6 = true;
            }
         }

         return var6;
      }
   }

   public boolean c(zaay var1, boolean var2) {
      if (this.b == null) {
         return false;
      } else {
         zagv var3 = this.a.c();

         for(int var4 = 0; var4 < this.b.length; ++var4) {
            if (this.b[var4].c(var1, var3.b(var4) != 64)) {
               return true;
            }
         }

         if (var3.a() == 32) {
            if (this.d != null && this.d.a != null) {
               return this.d.a.c(var1, var2);
            } else {
               return true;
            }
         } else {
            return false;
         }
      }
   }

   public boolean g() {
      return true;
   }

   public void a(boolean var1) {
      if (this.d == null) {
         this.d = new zaar();
      }

      if (var1 && this.b != null) {
         zagu[] var2 = this.b;
         int var3 = var2.length;

         for(int var4 = 0; var4 < var3; ++var4) {
            zagu var5 = var2[var4];
            var5.a(true);
         }
      }

   }

   public zaar h() {
      return this.d;
   }

   public void a(zaar var1) {
      this.d = var1;
   }

   public zagu e(zaay var1) {
      zagu var2 = this.d(var1);
      if (var2 != null && var2 != this) {
         var2 = var2.e(var1);
      }

      return var2;
   }

   public byte a() {
      return (byte)(this.a.c().d() ? 33 : 34);
   }

   public int m() {
      return this.b == null ? 0 : this.b.length;
   }

   public zagu[] n() {
      return this.b;
   }

   public void a(zagu[] var1, zaay var2) {
      if (var1 != null && var1.length < 1) {
         var1 = null;
      }

      this.d = null;
      this.b = var1;
      if (var1 != null) {
         zagv var3 = this.a.c();
         if (var1.length > var3.b()) {
            throw new CellsException(5, "You have entered too many parameters for function " + this.a.a());
         }

         if (var1.length < var3.c()) {
            throw new CellsException(5, "You have entered too few parameters for function " + this.a.a());
         }

         if (var2 != null && !var2.i && this.c != 96 && this.c(var2)) {
            this.c = 96;
         }
      }

   }

   public void a(StringBuilder var1, zaay var2) {
      var1.append(this.a.a());
      var1.append('(');
      if (this.b != null && this.b.length > 0) {
         int var3 = var2 != null && var2.p.v == 14 ? 59 : 44;
         zagu[] var4 = this.b;
         int var5 = var4.length;

         for(int var6 = 0; var6 < var5; ++var6) {
            zagu var7 = var4[var6];
            if (var7 != null) {
               var7.a(var1, var2);
            }

            var1.append((char)var3);
         }

         var1.setLength(var1.length() - 1);
      }

      var1.append(')');
   }

   public zagu d(zaay var1) {
      if (this.d != null) {
         if (this.d.a == null) {
            this.d.a = this.l(var1);
         }

         return this.d.a;
      } else {
         return this.l(var1);
      }
   }

   private zagu l(zaay var1) {
      int var2 = this.a.b();
      zagu var3;
      zyz var4;
      double[] var8;
      switch(var2) {
      case 0:
         return zfa.a(new zbox(false, false), this.b, var1, 0);
      case 1:
         return zex.b(this.b, var1);
      case 2:
      case 3:
      case 105:
      case 126:
      case 127:
      case 128:
      case 129:
      case 190:
      case 198:
         return zey.b(var2, this.b[0], var1);
      case 4:
         return zfa.a(new zbpo(false), this.b, var1, 0);
      case 5:
         return zfa.a(new zbos(false, false), this.b, var1, 0);
      case 6:
         return zfa.a(new zbpj(false, false), this.b, var1, 0);
      case 7:
         return zfa.a(new zbpi(false, false), this.b, var1, 0);
      case 8:
         return zex.a(this.b, var1, true);
      case 9:
         return zex.a(this.b, var1, false);
      case 10:
         return zzb.a;
      case 11:
         return zfa.b(this.b, var1);
      case 12:
      case 193:
      case 227:
      case 269:
      case 318:
      case 322:
      case 323:
      case 364:
      case 366:
         return zfa.a(new zboy(var2, false), this.b, var1, 0);
      case 13:
      case 14:
      case 109:
      case 197:
      case 204:
      case 387:
      case 388:
      case 389:
      case 411:
      case 418:
      case 419:
      case 423:
         return zex.a(this, this.b, var1, 2, 7);
      case 15:
      case 16:
      case 17:
      case 18:
      case 20:
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
      case 26:
      case 98:
      case 99:
      case 100:
      case 111:
      case 184:
      case 229:
      case 230:
      case 231:
      case 232:
      case 233:
      case 234:
      case 271:
      case 279:
      case 283:
      case 284:
      case 294:
      case 296:
      case 298:
      case 342:
      case 343:
      case 415:
      case 416:
      case 424:
      case 502:
         return zey.a(var2, this.b, var1, 7, 1);
      case 19:
         return new zyy(3.141592653589793D);
      case 27:
      case 39:
      case 97:
      case 212:
      case 213:
      case 274:
      case 275:
      case 276:
      case 285:
      case 288:
      case 299:
      case 332:
      case 337:
      case 417:
      case 422:
      case 425:
      case 426:
      case 427:
      case 428:
      case 443:
      case 444:
      case 445:
      case 446:
      case 464:
      case 508:
      case 510:
      case 535:
      case 536:
      case 538:
         return zey.a(var2, this.b, var1, 7, 2);
      case 28:
         return zfb.a(this.b, var1);
      case 29:
         return zex.b(this.c, this.b, var1);
      case 30:
         return zey.a(var2, this.b, var1, 1, 1, 7);
      case 31:
      case 119:
      case 207:
      case 210:
         return zey.a(var2, this.b, var1, 1, 2, 7);
      case 32:
      case 112:
      case 113:
      case 114:
      case 118:
      case 121:
      case 162:
      case 211:
      case 385:
      case 392:
      case 393:
         return zey.a(var2, this.b, var1, 1);
      case 33:
         return zey.c(this.b[0], var1);
      case 34:
         return zyx.a;
      case 35:
         return zyw.a;
      case 36:
         return zfa.a(new zbot(true), this.b, var1, 0);
      case 37:
         return zfa.a(new zbot(false), this.b, var1, 0);
      case 38:
         return zey.c(var2, this.b, var1, 1);
      case 40:
      case 41:
      case 42:
      case 43:
      case 44:
      case 45:
      case 47:
      case 189:
      case 195:
      case 196:
      case 199:
      case 235:
         return zet.a(var2, this.b, var1);
      case 46:
      case 541:
         return zfa.a(new zbpp(false, false, false), this.b, var1, 0);
      case 48:
         return zey.a(this.b[0], this.b[1], var1);
      case 49:
      case 51:
      case 303:
      case 304:
      case 305:
      case 306:
      case 307:
      case 308:
      case 311:
      case 312:
      case 313:
      case 314:
      case 315:
      case 511:
      case 514:
      case 515:
         return zez.b(var2, this.b, var1, 0, 2);
      case 50:
         return zez.a(this.b, var1, false, false);
      case 52:
         return zez.a(this.b, var1, true, false);
      case 53:
      case 54:
      case 55:
      case 79:
      case 80:
      case 81:
      case 84:
      case 85:
      case 87:
      case 88:
      case 89:
      case 90:
      case 91:
      case 92:
      case 93:
      case 94:
      case 95:
      case 96:
      case 103:
      case 104:
      case 106:
      case 107:
      case 108:
      case 110:
      case 122:
      case 123:
      case 132:
      case 133:
      case 134:
      case 135:
      case 136:
      case 137:
      case 138:
      case 139:
      case 145:
      case 146:
      case 147:
      case 149:
      case 150:
      case 151:
      case 152:
      case 153:
      case 154:
      case 155:
      case 156:
      case 157:
      case 158:
      case 159:
      case 160:
      case 161:
      case 166:
      case 170:
      case 171:
      case 172:
      case 173:
      case 174:
      case 175:
      case 176:
      case 177:
      case 178:
      case 179:
      case 180:
      case 181:
      case 182:
      case 185:
      case 186:
      case 187:
      case 188:
      case 191:
      case 192:
      case 200:
      case 201:
      case 202:
      case 203:
      case 214:
      case 215:
      case 217:
      case 218:
      case 223:
      case 224:
      case 225:
      case 226:
      case 236:
      case 237:
      case 238:
      case 239:
      case 240:
      case 241:
      case 242:
      case 243:
      case 244:
      case 245:
      case 246:
      case 248:
      case 249:
      case 250:
      case 251:
      case 253:
      case 254:
      case 255:
      case 256:
      case 257:
      case 258:
      case 259:
      case 260:
      case 262:
      case 263:
      case 264:
      case 265:
      case 266:
      case 267:
      case 268:
      case 310:
      case 333:
      case 334:
      case 335:
      case 338:
      case 339:
      case 340:
      case 341:
      case 348:
      case 349:
      case 352:
      case 353:
      case 355:
      case 356:
      case 357:
      case 360:
      case 368:
      case 369:
      case 370:
      case 371:
      case 372:
      case 373:
      case 374:
      case 375:
      case 376:
      case 377:
      case 378:
      case 379:
      case 506:
      case 509:
      case 513:
      case 518:
      case 520:
      case 525:
      case 534:
      case 537:
      default:
         return this.m(var1);
      case 56:
      case 57:
      case 58:
      case 59:
      case 144:
      case 247:
      case 270:
      case 272:
      case 504:
         return zex.a(this, this.b, var1, 5, 7);
      case 60:
      case 167:
      case 168:
      case 222:
         return zex.a(this, this.b, var1, 6, 7);
      case 61:
      case 62:
         return zez.a(this, this.b, var1, 0);
      case 63:
         return new zyy(var1.p.t.nextDouble());
      case 64:
         return zfb.b(this.b, var1);
      case 65:
      case 66:
      case 142:
      case 277:
      case 278:
      case 281:
      case 282:
      case 287:
      case 290:
      case 291:
      case 292:
      case 295:
      case 297:
      case 301:
      case 501:
      case 512:
      case 517:
      case 519:
      case 522:
         return zey.a(var2, this.b, var1, 7, 3);
      case 67:
      case 68:
      case 69:
      case 71:
      case 72:
      case 73:
         return zeu.a(var2, this.b, var1);
      case 70:
         return zeu.a(var2, this.b, var1, 1, 7);
      case 74:
         return var1.a(DateTime.getNow());
      case 75:
         return zey.f(this.b[0], var1);
      case 76:
         return zey.a(true, this.b[0], var1);
      case 77:
         return zey.a(false, this.b[0], var1);
      case 78:
         return zex.a(this.c, this.b, var1);
      case 82:
      case 124:
      case 205:
      case 206:
         return zex.a(var2, this.b, var1, 2, 1, 7);
      case 83:
         return zez.g(this.b, var1);
      case 86:
         return zey.d(this.b[0], var1);
      case 101:
         return zfb.a(this.b, var1, false);
      case 102:
         return zfb.a(this.b, var1, true);
      case 115:
      case 116:
      case 208:
      case 209:
      case 384:
      case 386:
      case 390:
      case 391:
      case 394:
      case 395:
         return zex.a(var2, this.b, var1, 1, 1, 7);
      case 117:
         return zey.a(var2, this.b, var1, 2);
      case 120:
         return zex.a(var2, this.b, var1, 3, 1, 7);
      case 125:
         return zex.a(this.b, var1);
      case 130:
         return zey.a(this.b[0], var1);
      case 131:
         return zey.b(this.b[0], var1);
      case 140:
      case 141:
         return zey.a(var2, this.b[0], var1);
      case 143:
      case 289:
      case 350:
         return zey.a(var2, this.b, var1, 7, 4);
      case 148:
         return zex.a(var2, this.b, var1, 1);
      case 163:
      case 164:
         return zez.a(var2, this.b, var1, 1);
      case 165:
         return zez.a(var2, this.b, var1, 2);
      case 169:
         return zfa.a(new zbox(true, false), this.b, var1, 0);
      case 183:
         return zfa.a(new zbpl(false), this.b, var1, 0);
      case 194:
      case 540:
         return zfa.a(new zbpp(true, false, false), this.b, var1, 0);
      case 216:
      case 532:
      case 533:
         return zez.a(var2, this.b, var1, 1, 57344);
      case 219:
         return zex.a(this, this.b, var1, 3, 7);
      case 220:
         return zeu.a(this.b, var1);
      case 221:
         return var1.a(DateTime.g());
      case 228:
         return zfa.a(this.b, var1);
      case 252:
         return zez.a(this.b, var1);
      case 261:
         return zey.e(this.b[0], var1);
      case 273:
      case 286:
      case 293:
      case 302:
      case 499:
      case 505:
      case 516:
      case 521:
      case 524:
      case 528:
      case 542:
         return zey.b(var2, this.b, var1, 7, 3);
      case 280:
      case 300:
      case 507:
      case 531:
         return zey.b(var2, this.b, var1, 7, 2);
      case 309:
         return zez.b(var2, this.b, var1, 1, 2);
      case 316:
      case 539:
         return zez.e(this.b, var1);
      case 317:
         return zez.b(this.b, var1);
      case 319:
         return zfa.a(new zbpa(), this.b, var1, 0);
      case 320:
         return zfa.a(new zbpd(), this.b, var1, 0);
      case 321:
         return zfa.a(new zbpn(), this.b, var1, 0);
      case 324:
      case 325:
      case 326:
      case 327:
      case 328:
      case 331:
      case 495:
      case 496:
      case 497:
      case 498:
      case 543:
         return zez.a(this, this.b, var1, 7);
      case 329:
      case 529:
      case 530:
         return zez.a(this, this.b, var1, 3);
      case 330:
      case 526:
         return zfa.a(new zbpf(false, 1), this.b, var1, 0);
      case 336:
         return zfa.d(this.b, var1);
      case 344:
         return zfa.c(this.b, var1);
      case 345:
      case 483:
         return zez.a(var2, this.b, var1);
      case 346:
         return zez.a(this, this.b[0], this.b[1], var1);
      case 347:
         return zez.a(this.b[0], var1);
      case 351:
         return zeu.b(this.b, var1);
      case 354:
         var8 = new double[1];
         var4 = zaaq.a(this.b, var1, 0, (double[])var8, 7);
         if (var4 != null) {
            return var4;
         } else {
            int var9 = 0;
            if (this.b.length > 1) {
               zagu var6 = this.b[1].e(var1);
               if (var6.b() == 1) {
                  if (!((zyv)var6).k()) {
                     var9 = 4;
                  }
               } else {
                  if (var6.b() == 0) {
                     return var6;
                  }

                  zyy var7 = var6.a(var1, 7);
                  if (var7 == null) {
                     return zzg.a;
                  }

                  var9 = (int)var7.k();
                  if (var9 < 0 || var9 > 4) {
                     return zzg.a;
                  }
               }
            }

            int var10 = (int)var8[0];
            if (var10 >= 0 && var10 <= 3999) {
               if (var10 == 0) {
                  return zaam.a;
               }

               return new zaam(zff.a(var10, var9));
            }

            return zzg.a;
         }
      case 358:
         return zfa.e(this.b, var1);
      case 359:
         if (var1.p.Q.c != null) {
            this.m(var1);
         }

         return zex.a(var2, this.b, var1, 2);
      case 361:
         return zfa.a(new zbos(true, false), this.b, var1, 0);
      case 362:
         return zfa.a(new zbpi(true, false), this.b, var1, 0);
      case 363:
         return zfa.a(new zbpj(true, false), this.b, var1, 0);
      case 365:
         return zfa.a(new zbpp(true, true, false), this.b, var1, 0);
      case 367:
         return zfa.a(new zbpp(false, true, false), this.b, var1, 0);
      case 380:
      case 381:
      case 382:
      case 383:
      case 477:
      case 478:
      case 479:
         throw new CellsException(5, "Unsupported function: " + this.a.a());
      case 396:
      case 397:
         return zey.b(var2, this.b, var1, 2);
      case 398:
         return zey.a(this.b, var1);
      case 399:
      case 400:
      case 401:
      case 402:
      case 403:
      case 404:
      case 405:
      case 406:
      case 407:
      case 408:
      case 409:
      case 410:
         return zey.b(var2, this.b, var1, 1);
      case 412:
      case 413:
         return zfa.a(new zbow(var2), this.b, var1, 0);
      case 414:
         return zez.d(this.b, var1);
      case 420:
      case 421:
         return zey.a(var2, this.b, var1, 5, 1);
      case 429:
         return zez.h(this.b, var1);
      case 430:
         return zez.f(this.b, var1);
      case 431:
      case 432:
         return zex.b(var2, this.b, var1, 3, 3, 7);
      case 433:
      case 434:
      case 435:
      case 436:
      case 437:
      case 470:
         return zex.b(var2, this.b, var1, 2, 3, 7);
      case 438:
      case 439:
      case 440:
         return zey.a(var2, this.b, var1);
      case 441:
      case 442:
         return zex.b(var2, this.b, var1, 2, 5, 7);
      case 447:
      case 448:
         return zey.b(var2, this.b, var1);
      case 449:
      case 450:
      case 465:
         return zeu.a(var2, this.b, var1, 1, 5);
      case 451:
         return zeu.h(this.b, var1);
      case 452:
      case 453:
      case 454:
      case 455:
      case 456:
      case 457:
         return zex.b(var2, this.b, var1, 2, 2, 7);
      case 458:
      case 459:
         return zex.b(var2, this.b, var1, 2, 4, 7);
      case 460:
      case 461:
         return zex.b(var2, this.b, var1, 3, 5, 7);
      case 462:
      case 463:
         return zex.b(var2, this.b, var1, 4, 5, 7);
      case 466:
      case 467:
         return zex.a(var2, this.b, var1, 1, 2, 4, 7);
      case 468:
         var8 = new double[1];
         var4 = zaaq.a(this.b, var1, 0, (double[])var8, 7);
         if (var4 != null) {
            return var4;
         } else {
            String[] var5 = new String[2];
            var4 = zaaq.a(this.b, var1, 1, (String[])var5);
            if (var4 != null) {
               return var4;
            }

            return zev.a(var8[0], var5[0], var5[1]);
         }
      case 469:
         return zex.b(var2, this.b, var1, 3, 4, 7);
      case 471:
         return zeu.d(this.b, var1);
      case 472:
         return zeu.f(this.b, var1);
      case 473:
         return zfa.a(new zboz(), this.b, var1, 0);
      case 474:
         return zfa.a(new zbpg(), this.b, var1, 0);
      case 475:
         return zfa.a(new zbpe(), this.b, var1, 0);
      case 476:
         return zez.c(this.b, var1);
      case 480:
         var3 = this.b[0].e(var1);
         return zey.b(3, (zagu)var3, var1).k() ? this.b[1] : var3;
      case 481:
         return zez.a(this, this.b, var1);
      case 482:
      case 484:
         return zez.b(this, this.b, var1);
      case 485:
         return zeu.c(this.b, var1);
      case 486:
         return zeu.e(this.b, var1);
      case 487:
         return zeu.g(this.b, var1);
      case 488:
         return zfa.f(this.b, var1);
      case 489:
         var3 = this.b[0].e(var1);
         if (var3 == zzb.a) {
            return this.b[1];
         }

         return var3;
      case 490:
         return zey.c(490, this.b, var1);
      case 491:
         return zey.c(491, this.b, var1);
      case 492:
         return zey.c(492, this.b, var1);
      case 493:
         return zey.a(this.b, var1, true);
      case 494:
         return zey.a(this.b, var1, false);
      case 500:
         return zey.b(var2, this.b, var1, 7, 1);
      case 503:
         return zex.c(var2, this.b, var1, 3, 1, 7);
      case 523:
         return zey.b(var2, this.b, var1, 7, 4);
      case 527:
         return zfa.a(new zbpf(false, var1.i ? var1.l.e() : 1), this.b, var1, 0);
      }
   }

   private zagu m(zaay var1) {
      if (var1.p.Q.c == null) {
         if (var1.p.Q.i.a) {
            com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var1.c((StringBuilder)null).append(": Unsupported function[").append(this.a.a()).append("]")));
         }

         return zzc.a;
      } else {
         ArrayList var2 = new ArrayList();
         ArrayList var3 = new ArrayList();
         com.aspose.cells.b.a.a.ze.a(var3, (Object)var1.p.f);
         com.aspose.cells.b.a.a.ze.a(var3, (Object)var1.d);
         com.aspose.cells.b.a.a.ze.a(var3, (Object)var1.e.checkCell(var1.g, var1.h));
         ArrayList var4 = new ArrayList();
         var1 = new zaay(var1);
         if (this.b != null) {
            for(int var5 = 0; var5 < this.b.length; ++var5) {
               zagu var6 = this.b[var5];
               com.aspose.cells.b.a.a.ze.a(var4, (Object)var6.k(var1));
               Object var7 = var6.b(var1);
               com.aspose.cells.b.a.a.ze.a(var2, var7);
            }
         }

         com.aspose.cells.b.a.a.ze.a(var3, (Object)var4);
         Object var8 = var1.p.Q.c.calculateCustomFunction(this.a.a(), var2, var3);
         return zaaq.a(var8, var1);
      }
   }

   public boolean f() {
      return false;
   }

   public boolean f(zaay var1) {
      if (this.d != null) {
         return true;
      } else {
         switch(this.b == null ? 0 : this.b.length) {
         case 0:
            return true;
         case 1:
            switch(this.a.b()) {
            case 8:
               return this.b[0].g(var1);
            case 9:
               return this.b[0].h(var1);
            default:
               return this.a(0, var1);
            }
         case 2:
            return this.a(0, var1) && this.a(1, var1);
         default:
            int var2;
            switch(this.a.b()) {
            case 101:
               if (!this.b[0].f(var1)) {
                  return false;
               } else if (!this.b[2].g(var1)) {
                  return false;
               } else {
                  if (this.b.length > 3) {
                     for(var2 = 3; var2 < this.b.length; ++var2) {
                        if (!this.b[var2].f(var1)) {
                           return false;
                        }
                     }
                  }

                  return true;
               }
            case 102:
               if (!this.b[0].f(var1)) {
                  return false;
               } else if (!this.b[2].h(var1)) {
                  return false;
               } else {
                  if (this.b.length > 3) {
                     for(var2 = 3; var2 < this.b.length; ++var2) {
                        if (!this.b[var2].f(var1)) {
                           return false;
                        }
                     }
                  }

                  return true;
               }
            default:
               for(var2 = 0; var2 < this.b.length; ++var2) {
                  if (!this.a(var2, var1)) {
                     return false;
                  }
               }

               return true;
            }
         }
      }
   }

   public boolean g(zaay var1) {
      if (this.d != null) {
         return true;
      } else {
         switch(this.b == null ? 0 : this.b.length) {
         case 0:
            return true;
         case 1:
            switch(this.a.b()) {
            case 8:
               return this.b[0].g(var1);
            case 9:
               return true;
            default:
               return this.b(0, var1);
            }
         case 2:
            return this.b(0, var1) && this.b(1, var1);
         default:
            int var2;
            switch(this.a.b()) {
            case 101:
               if (!this.b[0].g(var1)) {
                  return false;
               } else if (!this.b[2].g(var1)) {
                  return false;
               } else {
                  if (this.b.length > 3) {
                     for(var2 = 3; var2 < this.b.length; ++var2) {
                        if (!this.b[var2].g(var1)) {
                           return false;
                        }
                     }
                  }

                  return true;
               }
            case 102:
               if (!this.b[0].f(var1)) {
                  return false;
               } else {
                  if (this.b.length > 3) {
                     for(var2 = 3; var2 < this.b.length; ++var2) {
                        if (!this.b[var2].g(var1)) {
                           return false;
                        }
                     }
                  }

                  return true;
               }
            default:
               for(var2 = 0; var2 < this.b.length; ++var2) {
                  if (!this.b(var2, var1)) {
                     return false;
                  }
               }

               return true;
            }
         }
      }
   }

   public boolean h(zaay var1) {
      if (this.d != null) {
         return true;
      } else {
         switch(this.b == null ? 0 : this.b.length) {
         case 0:
            return true;
         case 1:
            switch(this.a.b()) {
            case 8:
               return true;
            case 9:
               return this.b[0].h(var1);
            default:
               return this.c(0, var1);
            }
         case 2:
            return this.c(0, var1) && this.c(1, var1);
         default:
            int var2;
            switch(this.a.b()) {
            case 101:
               if (!this.b[0].h(var1)) {
                  return false;
               } else {
                  if (this.b.length > 3) {
                     for(var2 = 3; var2 < this.b.length; ++var2) {
                        if (!this.b[var2].h(var1)) {
                           return false;
                        }
                     }
                  }

                  return true;
               }
            case 102:
               if (!this.b[0].h(var1)) {
                  return false;
               } else if (!this.b[2].h(var1)) {
                  return false;
               } else {
                  if (this.b.length > 3) {
                     for(var2 = 3; var2 < this.b.length; ++var2) {
                        if (!this.b[var2].h(var1)) {
                           return false;
                        }
                     }
                  }

                  return true;
               }
            default:
               for(var2 = 0; var2 < this.b.length; ++var2) {
                  if (!this.c(var2, var1)) {
                     return false;
                  }
               }

               return true;
            }
         }
      }
   }

   public zagu a(int[] var1, zaay var2, boolean var3) {
      if (this.d != null) {
         var1[0] = 1;
         var1[1] = 1;
         return (zagu)(this.d.a != null ? this.d.a.a(var1, var2, var3) : this);
      } else {
         int var5;
         int var7;
         int var8;
         switch(this.b == null ? 0 : this.b.length) {
         case 0:
            var1[0] = 1;
            var1[1] = 1;
            return this;
         case 1:
            zagu var10;
            switch(this.a.b()) {
            case 8:
               var1[1] = 0;
               var10 = this.b[0].a(var1, var2, true);
               if (var10 != this.b[0] && var1[0] != 1) {
                  return new zzi(this.c, this.a, new zagu[]{var10});
               }

               return this;
            case 9:
               var1[0] = 0;
               var10 = this.b[0].a(var1, var2, true);
               if (var10 != this.b[0] && var1[1] != 1) {
                  return new zzi(this.c, this.a, new zagu[]{var10});
               }

               return this;
            default:
               var10 = this.a(0, var1, var2);
               if (var10 != this.b[0] && (var1[0] != 1 || var1[1] != 1)) {
                  return new zzi(this.c, this.a, new zagu[]{var10});
               }

               return this;
            }
         case 2:
            int var4 = var1[0];
            var5 = var1[1];
            zagu var6 = this.a(0, var1, var2);
            var7 = var1[0];
            var8 = var1[1];
            var1[0] = var4;
            var1[1] = var5;
            zagu var9 = this.a(1, var1, var2);
            if (var7 > var1[0]) {
               var1[0] = var7;
            }

            if (var8 > var1[1]) {
               var1[1] = var8;
            }

            if (var1[0] == 1 && var1[1] == 1) {
               return this;
            }

            return new zzi(this.c, this.a, new zagu[]{var6, var9});
         default:
            zagu[] var11 = new zagu[this.b.length];
            var5 = var1[0];
            int var12 = var1[1];
            var7 = 1;
            var8 = 1;
            int var13;
            switch(this.a.b()) {
            case 101:
               var11[0] = this.b[0].a(var1, var2, false);
               var7 = var1[0];
               var8 = var1[1];
               var1[0] = var5;
               var1[1] = var12;
               var11[1] = this.b[1];
               var11[2] = this.b[2].a(var1, var2, false);
               if (var1[1] > 1) {
                  var11[2] = zzf.a;
               }

               if (var1[0] > var7) {
                  var7 = var1[0];
               }

               if (this.b.length > 3) {
                  for(var13 = 3; var13 < this.b.length; ++var13) {
                     var1[0] = var5;
                     var1[1] = var12;
                     var11[var13] = this.b[var13].a(var1, var2, false);
                     if (var1[0] > var7) {
                        var7 = var1[0];
                     }

                     if (var1[1] > var8) {
                        var8 = var1[1];
                     }
                  }
               }

               var1[0] = var7;
               var1[1] = var8;
               break;
            case 102:
               var11[0] = this.b[0].a(var1, var2, false);
               var7 = var1[0];
               var8 = var1[1];
               var1[0] = var5;
               var1[1] = var12;
               var11[1] = this.b[1];
               var11[2] = this.b[2].a(var1, var2, false);
               if (var1[0] > 1) {
                  var11[2] = zzf.a;
               }

               if (var1[1] > var8) {
                  var8 = var1[1];
               }

               if (this.b.length > 3) {
                  for(var13 = 3; var13 < this.b.length; ++var13) {
                     var1[0] = var5;
                     var1[1] = var12;
                     var11[var13] = this.b[var13].a(var1, var2, false);
                     if (var1[0] > var7) {
                        var7 = var1[0];
                     }

                     if (var1[1] > var8) {
                        var8 = var1[1];
                     }
                  }
               }

               var1[0] = var7;
               var1[1] = var8;
               break;
            default:
               for(var13 = 0; var13 < this.b.length; ++var13) {
                  var1[0] = var5;
                  var1[1] = var12;
                  var11[var13] = this.a(var13, var1, var2);
                  if (var1[0] > var7) {
                     var7 = var1[0];
                  }

                  if (var1[1] > var8) {
                     var8 = var1[1];
                  }
               }

               var1[0] = var7;
               var1[1] = var8;
            }

            return var7 == 1 && var8 == 1 ? this : new zzi(this.c, this.a, var11);
         }
      }
   }

   public zagu a(int[] var1, zaay var2) {
      if (this.d != null) {
         var1[0] = 1;
         if (this.d.a != null) {
            return this.d.a.a(var1, var2);
         } else {
            var1[0] = 1;
            return this;
         }
      } else {
         int var5;
         switch(this.b == null ? 0 : this.b.length) {
         case 0:
            var1[0] = 1;
            return this;
         case 1:
            zagu var7;
            switch(this.a.b()) {
            case 8:
               var7 = this.b[0].a(var1, var2);
               if (var1[0] == 1) {
                  return this;
               }

               return new zzi(this.c, this.a, new zagu[]{var7});
            case 9:
               return this;
            default:
               var7 = this.b(0, var1, var2);
               if (var1[0] == 1) {
                  return this;
               }

               return new zzi(this.c, this.a, new zagu[]{var7});
            }
         case 2:
            int var3 = var1[0];
            zagu var4 = this.b(0, var1, var2);
            var5 = var1[0];
            var1[0] = var3;
            zagu var6 = this.b(1, var1, var2);
            if (var1[0] < var5) {
               var1[0] = var5;
            }

            if (var5 == 1) {
               return this;
            }

            return new zzi(this.c, this.a, new zagu[]{var4, var6});
         default:
            zagu[] var8 = new zagu[this.b.length];
            int var9 = var1[0];
            var5 = 1;
            int var10;
            switch(this.a.b()) {
            case 101:
               var8[0] = this.b[0].a(var1, var2);
               var5 = var1[0];
               var1[0] = var9;
               var8[1] = this.b[1];
               var8[2] = this.b[2].a(var1, var2);
               if (var1[0] > var5) {
                  var5 = var1[0];
               }

               if (this.b.length > 3) {
                  for(var10 = 3; var10 < this.b.length; ++var10) {
                     var1[0] = var9;
                     var8[var10] = this.b[var10].a(var1, var2);
                     if (var1[0] > var5) {
                        var5 = var1[0];
                     }
                  }
               }

               var1[0] = var5;
               break;
            case 102:
               var8[0] = this.b[0].a(var1, var2);
               var5 = var1[0];
               var1[0] = var9;
               var8[1] = this.b[1];
               var8[2] = this.b[2].a(var1, var2);
               if (var1[0] > 1) {
                  var8[2] = zzf.a;
               }

               if (this.b.length > 3) {
                  for(var10 = 3; var10 < this.b.length; ++var10) {
                     var1[0] = var9;
                     var8[var10] = this.b[var10].a(var1, var2);
                     if (var1[0] > var5) {
                        var5 = var1[0];
                     }
                  }
               }

               var1[0] = var5;
               break;
            default:
               for(var10 = 0; var10 < this.b.length; ++var10) {
                  var1[0] = var9;
                  var8[var10] = this.b(var10, var1, var2);
                  if (var1[0] > var5) {
                     var5 = var1[0];
                  }
               }

               var1[0] = var5;
            }

            return var5 == 1 ? this : new zzi(this.c, this.a, var8);
         }
      }
   }

   public zagu b(int[] var1, zaay var2) {
      if (this.d != null) {
         var1[0] = 1;
         if (this.d.a != null) {
            return this.d.a.b(var1, var2);
         } else {
            var1[0] = 1;
            return this;
         }
      } else {
         int var5;
         switch(this.b == null ? 0 : this.b.length) {
         case 0:
            var1[0] = 1;
            return this;
         case 1:
            zagu var7;
            switch(this.a.b()) {
            case 8:
               var7 = this.b[0].b(var1, var2);
               if (var1[0] == 1) {
                  return this;
               }

               return new zzi(this.c, this.a, new zagu[]{var7});
            case 9:
               return this;
            default:
               var7 = this.c(0, var1, var2);
               if (var1[0] == 1) {
                  return this;
               }

               return new zzi(this.c, this.a, new zagu[]{var7});
            }
         case 2:
            int var3 = var1[0];
            zagu var4 = this.c(0, var1, var2);
            var5 = var1[0];
            var1[0] = var3;
            zagu var6 = this.c(1, var1, var2);
            if (var1[0] < var5) {
               var1[0] = var5;
            }

            if (var5 == 1) {
               return this;
            }

            return new zzi(this.c, this.a, new zagu[]{var4, var6});
         default:
            zagu[] var8 = new zagu[this.b.length];
            int var9 = var1[0];
            var5 = 1;
            int var10;
            switch(this.a.b()) {
            case 101:
               var8[0] = this.b[0].b(var1, var2);
               var5 = var1[0];
               var1[0] = var9;
               var8[1] = this.b[1];
               var8[2] = this.b[2].b(var1, var2);
               if (var1[0] > 1) {
                  var8[2] = zzf.a;
               }

               if (this.b.length > 3) {
                  for(var10 = 3; var10 < this.b.length; ++var10) {
                     var1[0] = var9;
                     var8[var10] = this.b[var10].b(var1, var2);
                     if (var1[0] > var5) {
                        var5 = var1[0];
                     }
                  }
               }

               var1[0] = var5;
               break;
            case 102:
               var8[0] = this.b[0].b(var1, var2);
               var5 = var1[0];
               var1[0] = var9;
               var8[1] = this.b[1];
               var8[2] = this.b[2].b(var1, var2);
               if (var1[0] > var5) {
                  var5 = var1[0];
               }

               if (this.b.length > 3) {
                  for(var10 = 3; var10 < this.b.length; ++var10) {
                     var1[0] = var9;
                     var8[var10] = this.b[var10].b(var1, var2);
                     if (var1[0] > var5) {
                        var5 = var1[0];
                     }
                  }
               }

               var1[0] = var5;
               break;
            default:
               for(var10 = 0; var10 < this.b.length; ++var10) {
                  var1[0] = var9;
                  var8[var10] = this.c(var10, var1, var2);
                  if (var1[0] > var5) {
                     var5 = var1[0];
                  }
               }

               var1[0] = var5;
            }

            return var5 == 1 ? this : new zzi(this.c, this.a, var8);
         }
      }
   }

   public zahn a(zaay var1, boolean var2) {
      if (this.a.b() == 255) {
         if (this.d == null) {
            this.d = new zaar();
         }

         return this.d(var1).a(var1, var2);
      } else {
         zahn var3;
         if (var1.k) {
            if (this.d == null) {
               this.d = new zaar();
            } else if (this.d.b == zbme.a) {
               var1.m = 0;
               if (this.d.a != null) {
                  return this.d.a.a(var1, var2);
               }
            } else if (this.d.b != null) {
               var3 = this.d.b.c(var1);
               if (var3 != null) {
                  if (!var3.a()) {
                     var3 = var3.b(var1);
                  }

                  var3.a(var1);
                  return var3;
               }
            }
         } else if (this.d != null && this.d.a != null) {
            return this.d.a.a(var1, var2);
         }

         zahn var4;
         int var5;
         zahn var6;
         Object var16;
         zyv var17;
         switch(this.b == null ? 0 : this.b.length) {
         case 0:
            if (this.d == null && this.a.b() != 63) {
               this.d = new zaar();
            }

            return new zaya(this);
         case 1:
            int var11;
            zawt var15;
            switch(this.a.b()) {
            case 8:
               if (var1.k && this.d.b != zbme.a) {
                  var11 = var1.m;
                  var1.c();
                  var4 = this.b[0].a(var1, true);
                  if (var4.m()) {
                     this.d.b = zbme.a;
                     var1.a(var11);
                     return (new zzi(this.c, this.a, new zagu[]{var4.a(0, 0)})).d(var1, var2);
                  }

                  var15 = new zawt(var4.c(0), new zlh(var1, this, new zagu[1], var1.g, var1.h, 0), var1);
                  var4 = this.d.a(var15, var1);
                  var1.a(var11);
                  return var4;
               } else {
                  var3 = this.b[0].a(var1, true);
                  if (var3.m()) {
                     return (new zzi(this.c, this.a, new zagu[]{var3.a(0, 0)})).d(var1, var2);
                  }

                  return new zawt(var3.c(0), new zlh(var1, this, new zagu[1], var1.g, var1.h, 0), var1);
               }
            case 9:
               if (var1.k && this.d.b != zbme.a) {
                  var11 = var1.m;
                  var1.c();
                  var4 = this.b[0].a(var1, true);
                  if (var4.n()) {
                     this.d.b = zbme.a;
                     var1.a(var11);
                     return (new zzi(this.c, this.a, new zagu[]{var4.a(0, 0)})).d(var1, var2);
                  }

                  var15 = new zawt(var4.b(0), new zlh(var1, this, new zagu[1], var1.g, var1.h, 0), var1);
                  var4 = this.d.a(var15, var1);
                  var1.a(var11);
                  return var4;
               } else {
                  var3 = this.b[0].a(var1, true);
                  if (var3.n()) {
                     return (new zzi(this.c, this.a, new zagu[]{var3.a(0, 0)})).d(var1, var2);
                  }

                  return new zawt(var3.b(0), new zlh(var1, this, new zagu[1], var1.g, var1.h, 0), var1);
               }
            case 148:
               if (var1.i) {
                  if (var1.l.b()) {
                     var3 = this.b[0].a(var1, false);
                     if (!var3.l()) {
                        zagu var13 = this.b[0];
                        this.b[0] = var3.a(0, 0);
                        zagu var9 = this.d(var1);
                        this.b[0] = var13;
                        return var9.a(var1, var2);
                     }
                  } else if (!this.b[0].a(var1, false).l()) {
                     return new zaya(zzg.a);
                  }
               }

               if (var1.k) {
                  var11 = var1.m;
                  var1.m = this.b[0].b(var1, false);
                  var4 = this.d(var1).a(var1, var2);
                  var4 = this.d.a(var4, var1);
                  var1.a(var11);
                  return var4;
               }

               return this.d(var1).a(var1, var2);
            default:
               if (this.a.c().a() == 96) {
                  this.a(false);
                  return this.d(var1).a(var1, var2);
               } else if (var1.k && this.d.b != zbme.a) {
                  var11 = var1.m;
                  var1.c();
                  var4 = this.a(0, var1, var2);
                  if (var4.l()) {
                     this.d.b = zbme.a;
                     var1.a(var11);
                     if (var4.a(0, 0) == this.b[0]) {
                        return this.d(var1, var2);
                     }

                     zzi var10 = new zzi(this.c, this.a, new zagu[]{var4.a(0, 0)});
                     var10.a(false);
                     return new zaya(var10, 7);
                  }

                  var15 = new zawt(var4, new zlh(var1, this, new zagu[1], var1.g, var1.h, 0), var1);
                  var4 = this.d.a(var15, var1);
                  var1.a(var11);
                  return var4;
               } else {
                  var3 = this.a(0, var1, var2);
                  if (var3.l()) {
                     if (var3.a(0, 0) == this.b[0]) {
                        return this.d(var1, var2);
                     }

                     zzi var21 = new zzi(this.c, this.a, new zagu[]{var3.a(0, 0)});
                     var21.a(false);
                     return new zaya(var21, 7);
                  }

                  return new zawt(var3, new zlh(var1, this, new zagu[1], var1.g, var1.h, 0), var1);
               }
            }
         case 2:
            var3 = null;
            var4 = null;
            var5 = var1.m;
            if (var1.k && this.d.b != zbme.a) {
               var1.c();
            }

            switch(this.a.b()) {
            case 1:
               var3 = this.b[0].a(var1, false);
               if (var3.l() && !var3.x() && !var3.y()) {
                  var16 = var3.a(0, 0).e(var1);
                  if (((zagu)var16).b() != 0) {
                     var17 = ((zagu)var16).j(var1);
                     if (var17 == null) {
                        var16 = zzg.a;
                     } else if (((zyv)var17).k()) {
                        var16 = this.b[1];
                     } else {
                        var16 = zyw.a;
                     }
                  }

                  if (this.d == null) {
                     this.d = new zaar();
                  }

                  this.d.a = (zagu)var16;
                  if (var1.k && this.d.b != zbme.a) {
                     this.d.b = zbme.a;
                     var1.a(var5);
                  }

                  return ((zagu)var16).a(var1, var2);
               }

               var4 = this.a(1, var1, var2);
               break;
            case 148:
               if (var1.i) {
                  if (var1.l.b()) {
                     var3 = this.b[0].a(var1, false);
                     var4 = this.b[1].a(var1, false);
                     zagu var7;
                     zagu var14;
                     if (!var3.l()) {
                        var14 = this.b[0];
                        this.b[0] = var3.a(0, 0);
                        if (!var4.l()) {
                           zagu var8 = this.b[1];
                           this.b[1] = var4.a(0, 0);
                           var7 = this.d(var1);
                           this.b[1] = var8;
                        } else {
                           var7 = this.d(var1);
                        }

                        this.b[0] = var14;
                        if (var1.k && this.d.b != zbme.a) {
                           this.d.b = zbme.a;
                           var1.a(var5);
                        }

                        return var7.a(var1, var2);
                     }

                     if (!var4.l()) {
                        var14 = this.b[1];
                        this.b[1] = var4.a(0, 0);
                        var7 = this.d(var1);
                        this.b[1] = var14;
                        if (var1.k && this.d.b != zbme.a) {
                           this.d.b = zbme.a;
                           var1.a(var5);
                        }

                        return var7.a(var1, var2);
                     }
                  } else if (!this.b[0].f(var1) || !this.b[1].f(var1)) {
                     if (var1.k && this.d.b != zbme.a) {
                        this.d.b = zbme.a;
                        var1.a(var5);
                     }

                     return new zaya(zzg.a);
                  }
               }

               if (var1.k) {
                  var1.m = this.b[0].b(var1, false) & this.b[1].b(var1, false);
                  var6 = this.d(var1).a(var1, var2);
                  var6 = this.d.a(var6, var1);
                  var1.a(var5);
                  return var6;
               }

               return this.d(var1).a(var1, var2);
            default:
               if (this.a.c().a() == 96) {
                  switch(this.a.b()) {
                  case 50:
                     return zez.a(this.b, var1, false, true).a(var1, var2);
                  case 52:
                     return zez.a(this.b, var1, true, true).a(var1, var2);
                  default:
                     this.a(false);
                     return this.d(var1).a(var1, var2);
                  }
               }

               var3 = this.a(0, var1, var2);
               var4 = this.a(1, var1, var2);
            }

            if (var3.l()) {
               if (var4.l()) {
                  if (var1.k && this.d.b != zbme.a) {
                     this.d.b = zbme.a;
                     var1.a(var5);
                  }

                  if (var3.a(0, 0) == this.b[0] && var4.a(0, 0) == this.b[1]) {
                     return this.d(var1, var2);
                  }

                  zzi var19 = new zzi(this.c, this.a, new zagu[]{var3.a(0, 0), var4.a(0, 0)});
                  var19.a(false);
                  return new zaya(var19, 7);
               }

               var16 = new zawt(var4, new zlh(var1, this, new zagu[]{var3.a(0, 0), null}, var1.g, var1.h, 1), var1);
            } else if (var4.l()) {
               var16 = new zawt(var3, new zlh(var1, this, new zagu[]{null, var4.a(0, 0)}, var1.g, var1.h, 0), var1);
            } else {
               var16 = zayc.a(var3, var4, var1, new zli(var1, this, new zagu[2], var1.g, var1.h, 0, 1));
            }

            if (var1.k && this.d.b != zbme.a) {
               var16 = this.d.a((zahn)var16, var1);
               var1.a(var5);
            }

            return (zahn)var16;
         default:
            if (this.a.c().a() == 96) {
               switch(this.a.b()) {
               case 50:
                  return zez.a(this.b, var1, false, true).a(var1, var2);
               case 52:
                  return zez.a(this.b, var1, true, true).a(var1, var2);
               default:
                  this.a(false);
                  return this.d(var1).a(var1, var2);
               }
            } else {
               zabu var18 = new zabu(this, var1);
               int var22 = var1.m;
               if (var1.k && this.d.b != zbme.a) {
                  var1.c();
               }

               Object var12;
               zahn var20;
               int var23;
               switch(this.a.b()) {
               case 1:
                  var20 = this.b[0].a(var1, false);
                  if (var20.l()) {
                     var16 = var20.a(0, 0).e(var1);
                     if (((zagu)var16).b() != 0) {
                        var17 = ((zagu)var16).j(var1);
                        if (var17 == null) {
                           var16 = zzg.a;
                        } else if (((zyv)var17).k()) {
                           var16 = this.b[1];
                        } else {
                           var16 = this.b[2];
                        }
                     }

                     if (this.d == null) {
                        this.d = new zaar();
                     }

                     this.d.a = (zagu)var16;
                     if (var1.k && this.d.b != zbme.a) {
                        this.d.b = zbme.a;
                        var1.a(var22);
                     }

                     return ((zagu)var16).a(var1, var2);
                  }

                  var18.a(0, (zahn)var20);
                  var18.a(1, (zahn)this.b[1].a(var1, var2));
                  var18.a(2, (zahn)this.b[2].a(var1, var2));
                  var6 = var18.b();
                  if (var6 == null) {
                     var6 = this.a(var18, var1, var2);
                  }

                  if (var1.k && this.d.b != zbme.a) {
                     var6 = this.d.a(var6, var1);
                     var1.a(var22);
                  }

                  return var6;
               case 78:
                  if (!var1.i) {
                     return this.d(var1).a(var1, var2);
                  }
               default:
                  for(var5 = 0; var5 < this.b.length; ++var5) {
                     var18.a(var5, this.a(var5, var1, var2));
                  }

                  var20 = var18.b();
                  if (var20 == null) {
                     var20 = this.a(var18, var1, var2);
                  }

                  if (var1.k && this.d.b != zbme.a) {
                     var20 = this.d.a(var20, var1);
                     var1.a(var22);
                  }

                  return var20;
               case 101:
                  var18.a(0, (zahn)this.b[0].a(var1, false));
                  var18.a(1, (zagu)this.b[1]);
                  var12 = this.b[2].a(var1, false);
                  if (!((zahn)var12).l()) {
                     if (((zahn)var12).m()) {
                        var12 = new zaya(((zahn)var12).a(0, 0));
                     } else if (!((zahn)var12).n()) {
                        var12 = new zaya(zzf.a);
                     }
                  }

                  var18.a(2, (zahn)var12);
                  if (this.b.length > 3) {
                     for(var23 = 3; var23 < this.b.length; ++var23) {
                        var18.a(var23, this.b[var23].a(var1, false));
                     }
                  }

                  var6 = var18.b();
                  if (var6 == null) {
                     var6 = this.a(var18, var1, var2);
                  }

                  if (var1.k && this.d.b != zbme.a) {
                     var6 = this.d.a(var6, var1);
                     var1.a(var22);
                  }

                  return var6;
               case 102:
                  var18.a(0, (zahn)this.b[0].a(var1, false));
                  var18.a(1, (zagu)this.b[1]);
                  var12 = this.b[2].a(var1, false);
                  if (!((zahn)var12).l()) {
                     if (((zahn)var12).n()) {
                        var12 = new zaya(((zahn)var12).a(0, 0));
                     } else if (!((zahn)var12).m()) {
                        var12 = new zaya(zzf.a);
                     }
                  }

                  var18.a(2, (zahn)var12);
                  if (this.b.length > 3) {
                     for(var23 = 3; var23 < this.b.length; ++var23) {
                        var18.a(var23, this.b[var23].a(var1, false));
                     }
                  }

                  var6 = var18.b();
                  if (var6 == null) {
                     var6 = this.a(var18, var1, var2);
                  }

                  if (var1.k && this.d.b != zbme.a) {
                     var6 = this.d.a(var6, var1);
                     var1.a(var22);
                  }

                  return var6;
               }
            }
         }
      }
   }

   private zahn a(zabu var1, zaay var2, boolean var3) {
      zagu[] var4 = var1.a();

      for(int var5 = 0; var5 < this.b.length; ++var5) {
         if (this.b[var5] != var4[var5] && (this.b[var5].h() == null || this.b[var5].h().a != var4[var5])) {
            zzi var6 = new zzi(this.c, this.a, var4);
            if (this.a.c().a() != 64) {
               zagu var7 = var6.d(var2);
               if (this.d != null) {
                  this.d.a = var7;
               }

               return var7.a(var2, var3);
            } else {
               var6.a(false);
               return new zaya(var6, 7);
            }
         }
      }

      return this.d(var2, var3);
   }

   private zahn a(int var1, zaay var2, boolean var3) {
      zagu var4 = this.b[var1];
      int var5 = this.a.c().b(var1);
      if (var5 == 96) {
         return (zahn)(var4.b() == 7 && ((zzi)var4).a.b() == 78 ? var4.a(var2, false) : new zaya(var4));
      } else {
         return var4.a(var2, var3 || var5 == 32);
      }
   }

   private boolean a(int var1, zaay var2) {
      zagu var3 = this.b[var1];
      int var4 = this.a.c().b(var1);
      if (var4 == 96) {
         return var3.b() == 7 && ((zzi)var3).a.b() == 78 ? var3.f(var2) : true;
      } else {
         return var3.d() == 32 && this.a.c().a(var1) == 32 ? true : var3.f(var2);
      }
   }

   private boolean b(int var1, zaay var2) {
      zagu var3 = this.b[var1];
      int var4 = this.a.c().b(var1);
      if (var4 == 96) {
         return var3.b() == 7 && ((zzi)var3).a.b() == 78 ? var3.g(var2) : true;
      } else {
         return var3.d() == 32 && this.a.c().a(var1) == 32 ? true : var3.g(var2);
      }
   }

   private boolean c(int var1, zaay var2) {
      zagu var3 = this.b[var1];
      int var4 = this.a.c().b(var1);
      if (var4 == 96) {
         return var3.b() == 7 && ((zzi)var3).a.b() == 78 ? var3.h(var2) : true;
      } else {
         return var3.d() == 32 && this.a.c().a(var1) == 32 ? true : var3.h(var2);
      }
   }

   private zagu a(int var1, int[] var2, zaay var3) {
      zagu var4 = this.b[var1];
      int var5 = this.a.c().b(var1);
      if (var5 == 96) {
         if (var4.b() == 7 && ((zzi)var4).a.b() == 78) {
            return var4.a(var2, var3, false);
         } else {
            var2[0] = 1;
            var2[1] = 1;
            return var4;
         }
      } else if (var4.d() == 32 && this.a.c().a(var1) == 32) {
         var2[0] = 1;
         var2[1] = 1;
         return var4;
      } else {
         return var4.a(var2, var3, var5 == 32);
      }
   }

   private zagu b(int var1, int[] var2, zaay var3) {
      zagu var4 = this.b[var1];
      int var5 = this.a.c().b(var1);
      if (var5 == 96) {
         if (var4.b() == 7 && ((zzi)var4).a.b() == 78) {
            return var4.a(var2, var3);
         } else {
            var2[0] = 1;
            return var4;
         }
      } else if (var4.d() == 32 && this.a.c().a(var1) == 32) {
         var2[0] = 1;
         return var4;
      } else {
         return var4.a(var2, var3);
      }
   }

   private zagu c(int var1, int[] var2, zaay var3) {
      zagu var4 = this.b[var1];
      int var5 = this.a.c().b(var1);
      if (var5 == 96) {
         if (var4.b() == 7 && ((zzi)var4).a.b() == 78) {
            return var4.b(var2, var3);
         } else {
            var2[0] = 1;
            return var4;
         }
      } else if (var4.d() == 32 && this.a.c().a(var1) == 32) {
         var2[0] = 1;
         return var4;
      } else {
         return var4.b(var2, var3);
      }
   }

   private zahn d(zaay var1, boolean var2) {
      if (this.a.c().a() != 64) {
         zagu var3 = this.d(var1);
         if (this.d != null) {
            this.d.a = var3;
         }

         return var3.a(var1, var2);
      } else {
         if (this.d == null) {
            this.d = new zaar();
         }

         return new zaya(this);
      }
   }

   public boolean a(zagu var1) {
      if (var1.b() != 7) {
         return false;
      } else {
         zzi var2 = (zzi)var1;
         if (this.c != var2.c) {
            return false;
         } else if (!com.aspose.cells.b.a.zv.b(this.a.a(), var2.a.a())) {
            return false;
         } else {
            return zaaq.a(this.b, var2.b);
         }
      }
   }

   public zagu b(zagu var1) {
      if (this.a(var1)) {
         return this;
      } else {
         if (this.b != null && this.b.length > 0) {
            for(int var2 = 0; var2 < this.b.length; ++var2) {
               if (this.b[var2] != null) {
                  zagu var3 = this.b[var2].b(var1);
                  if (var3 != null) {
                     return var3;
                  }
               }
            }
         }

         return null;
      }
   }
}
